class CreateHotPosts < ActiveRecord::Migration
  def self.up
    create_table :hot_posts do |t|
      t.integer :hot_post_type_id
      t.string :author,
        :requested_url,
        :first_page_url,
        :title
      t.integer :user_id
      t.integer :words_count,
        :users_count,
        :sub_hot_posts_count,
        :default => 0
      t.datetime :first_released_at
      t.string :type
      t.string :status, :default => 'actived'
      t.text :the_last_error
      t.integer :trying_count, :default => 0
      t.integer :lz_sub_hot_posts_count, :default => 0
      t.timestamps
    end
  end

  def self.down
    drop_table :hot_posts
  end
end
